<include file="Public:header"/>
<script type="text/javascript" src="__WEBPUBLIC__/Admin/js/ajax-operate.js"></script>
<!--主页面-->
<div id="main-content" class="content">
    <ul class="breadcrumb">
        <li><a href="{:U('Index/main')}">首页</a></li>
        <li class=""><a href="">商家的评价管理</a></li>
        <li class="active">商家的评价列表</li>
    </ul>

    <div class="page-header page-header1 clearfix">
        <h3>商家的评价管理</h3>
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="{:U('Shop/appraise',array('shop_id'=>$_REQUEST['shop_id']))}">商家的评价列表</a>
            </li>
        </ul>
    </div>
    <div class="content-box-table content-box-content">
        <form action="{:U('Shop/delAppraise')}" method="post" class="batch-form">
            <table class="table table-striped table-framed table-hover">
                <thead>
                <tr>
                    <th width="8%">
                        <input class="check-all" type="checkbox" />&nbsp;&nbsp;编号
                    </th>
                    <th width="">评价时间</th>
                    <th width="">评价人名称</th>
                    <th width="">评价内容</th>
                    <th width="">操作</th>
                </tr>
                </thead>
                <tbody class="tbody">
                <if condition="empty($list)">
                    <tr><td colspan="20"><span style="font-size:14px;">暂无数据</span></td></tr>
                </if>
                <volist name="list" id="vo">
                    <tr>
                        <td><input type="checkbox" value="{$vo['app_id']}" name="app_id[]"/>&nbsp;&nbsp;{$vo['app_id']}</td>
                        <td>{$vo['ctime']|date='Y-m-d H:i:s',###}</td>
                        <td>{$vo['mem_name']}</td>
                        <td>{$vo['content']}</td>
                        <td>
                            <eq name="vo['status']" value="0">
                                <a title="显示" class="modify" style="cursor: pointer" onclick="up({$vo['app_id']},1)">
                                    <span class="icon glyphicon glyphicon-arrow-up"></span>
                                </a>&nbsp;
                            </eq>
                            <eq name="vo['status']" value="1">
                                <a title="不显示" class="modify" style="cursor: pointer" onclick="up({$vo['app_id']},0)">
                                    <span class="icon glyphicon glyphicon-arrow-down"></span>
                                </a>&nbsp;
                            </eq>
                            <a href="{:U('Shop/oneAppraise',array('app_id'=>$vo['app_id'],'shop_id'=>$_REQUEST['shop_id']))}" title="查看详情" class="modify">
                                <span class="icon glyphicon glyphicon-list-alt"></span>
                            </a>&nbsp;
                            <a href="#" title="删除" class="delete-delete">
                                <span class="icon glyphicon glyphicon-remove"></span>
                            </a><input type="hidden" value="{:U('Shop/delAppraise',array('app_id'=>$vo['app_id']))}">
                        </td>
                    </tr>
                </volist>
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="20">
                        <div class="bulk-actions fl">
                            <input type="button" class="btn delete-batch" value="批量删除">　
                        </div>
                        <div class="fr">
                            {$page}
                        </div>
                    </td>
                </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>
<script>
    /**商家的评价的显示不显示*/
    function up(id,status){
        if(confirm("确认操作？")){
            var url = "{:U('Shop/ajaxAppraise')}";
            $.post(url,{'id':id,'status':status},function(data){
                if(data==1){
                    alert("修改成功");
                    window.location.reload();
                }else{
                    alert("修改失败");
                }
            });
        }
    }
</script>
<include file="Public:footer"/>

